package com.lagou.edu.controller;


import com.lagou.edu.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/email")
public class EmailController {
    @Autowired
    private EmailService emailService;

    @GetMapping("/send/{emailaddress}/{code}")
    public String sendEmail(@PathVariable("emailaddress") String emailaddress,@PathVariable("code") String code){
        String result = emailService.sendEmail(emailaddress, code);
        return result;
    }
}
